<template>
	<view>
		<!-- <uncheckedList ref="uncheckedList" />
		<divider /> -->
		<van-empty description="暂无数据" v-show="emptyData"/>
		<van-list v-model="loading" :finished="finished" @load="load">
			<van-cell center v-for="item in newsList" :title="item.title" :label="`公文类型：${type}`" :value="item.date" to="/pages/receive/receiveDocDetail" value-class="text-sm" >
				<!-- <template #extra>
					<van-button plain round type="info" size="small" >查看详情</van-button>
				</template> -->
				<template #extra>
					<van-tag mark type="primary">{{status}}</van-tag>
				</template>
			</van-cell>
		</van-list>
	</view>
</template>

<script>
	import divider from 'pages/admin/components/frame/compo-divider.vue';
	import uncheckedList from 'pages/admin/components/receiveDoc/compo-uncheckedList.vue';
	export default {
		components: {
			uncheckedList,
			divider
		},
		data() {
			return {
				emptyData:false,//是否显示暂无数据图片
				type:'注办审核',//公文类型
				status:'注办中',
				page:1,
				rows:100,
				newsList: [{
						title: '民用航空空中交通通信导',
						type: '注办审核',
						date: '2021-04-19'
					},
					{
						title: '民航局政府网站2021年',
						type: '注办审核',
						date: '2021-04-19'
					}
				],
				loading: false,
				finished: false,
			}
		},
		methods: {
			onLoad() {},
			load() {
				this.queryGwhgList()
			},
			//获取待核收文待办数量
			queryGwhgList(){
				this.newsList = []
				var _this = this
				this.$http({
				  // url: 'http://39.98.62.88/caac/oa/doc/gwhgList/queryGwhgList?gwhgStatus=1&page='+this.page+'&rows='+this.rows+'&systemKey=jb_sun&systemFlag=yidong',
				  url: this.$http.adornUrl(`/caac/oa/doc/gwhgList/queryGwhgList`),
				  method: 'get',
				  params: this.$http.adornParams({
					  'gwhgStatus': 1,
					  'page': this.page,
					  'rows': this.rows,
					  'systemKey': 'zhangqi',//固定值
					  'systemFlag': 'yidong'//固定值
				  })
				}).then(({data}) => {
					console.log("待核收文：data: " + JSON.stringify(data));
					if(data.code==200){
						_this.loading = false;
						_this.newsList = data.data.rows
						if(data.data.rows.length==0){
							this.emptyData = true
						}
						_this.finished = true;
					}else{
						console.log("获取待核收文出错--data: " + JSON.stringify(data));
					}
				})
			},
			
		}
	}
</script>

<style>
</style>
